package tech.yunland.shop.domain.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.moyuer.bsf.domain.model.AbstractEntity;
import com.moyuer.bsf.domain.model.Attachment;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 会员卡图片
 *
 * @author 文卡<wkwenka@gmail.com>  on 17-6-27.
 */
@Entity
@Table(name = "member_card_pictures")
public class MemberCardPictures extends AbstractEntity {

    @JSONField(serialize = false)
    @ManyToOne()
    @JoinColumn(name = "member_card_id")
    private MemberCard memberCard;

    @JSONField(serialize = false)
    @ManyToOne
    @JoinColumn(name = "picture_id")
    private Attachment picture;

    public MemberCard getMemberCard() {
        return memberCard;
    }

    public void setMemberCard(MemberCard memberCard) {
        this.memberCard = memberCard;
    }

    public Attachment getPicture() {
        return picture;
    }

    public void setPicture(Attachment picture) {
        this.picture = picture;
    }
}
